import org.apache.http.auth.AuthScope;
import org.apache.http.auth.NTCredentials;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.HttpResponse;
import org.apache.http.client.params.CookiePolicy;


public class NTLM_ping {
 public NTLM_ping() {
     super();
     }

 public static void main(String[] args) throws Exception {

        DefaultHttpClient httpclient = new DefaultHttpClient();
        httpclient.getAuthSchemes().register("ntlm", new NTLMSchemeFactory());

        //add credentials
        httpclient.getCredentialsProvider().setCredentials(
            new AuthScope("host", -1), 
            new NTCredentials(
                      "user"
                    , "password"
                    , "host"
                    , "domain"));

        HttpGet httpget = new HttpGet("http://<url>");
        //ignore cookies
        httpget.getParams().setParameter("http.protocol.cookie-policy", CookiePolicy.IGNORE_COOKIES);
     try {
     // execute the GET
            HttpResponse status = httpclient.execute(httpget);
            System.out.println(status.getProtocolVersion());
            System.out.println(status.getStatusLine().getStatusCode());
            System.out.println(status.getStatusLine().getReasonPhrase());
            System.out.println(status.getStatusLine().toString());
     } finally {
     // release any resources
        }
    }
}